package dataflow.example;

import org.apache.log4j.Logger;

public class w1 {

	static Logger log = Logger.getLogger(Worker4.class);
	
	private static int num;
	
	public Integer run(Integer p){
		log.info("w1: running");
		if(p == 1){
			num = 1;
		} else {
			num++;
		}
		log.info("w1: " + num);
		return 2;
	}
	
	public Object getnewToken(){
		return num;
	}
}
